package miaofusdk

/**
目前基本上所有的交易结构都返回这个数据结构
**/
type TradeBean struct {
	TradeNo          string `json:"trade_no"`
	TradeStatus      string `json:"trade_status"`
	TradeType        string `json:"trade_type"`
	TradeChannel     string `json:"trade_channel"`
	TotalAmount      int    `json:"total_amount,string"`
	CurrentAmount    int    `json:"current_amount,string,omitempty"`
	SellerAmount     int    `json:"seller_amount,string"`
	SellerCoupon     int    `json:"seller_coupon,string"`
	BuyerAmount      int    `json:"buyer_amount,string"`
	ChnCoupon        int    `json:"chn_coupon,string"`
	UnDiscountAmount int    `json:"undiscount_amount,string"`
	BuyerId          string `json:"buyer_id"`
	StoreName        string `json:"store_name"`
	StoreCode        string `json:"store_code"`
	DeviceCode       string `json:"device_code"`
	DownTradeNo      string `json:"down_trade_no"`
	UpTradeNo        string `json:"up_trade_no"`
	RawData          string `json:"raw_data"`
	OperId           string `json:"oper_id"`
	Subject          string `json:"subject"`
	TimeEnd          string `json:"time_end"`
	RefundTime       string `json:"refund_time"`
	CodeUrl          string `json:"code_url,omitempty"`
	PrePayId         string `json:"prepay_id,omitempty"`
}

type RespTrade struct {
	Response
	Data TradeBean `json:"data,omitempty"`
}

type RespTrades struct {
	Response
	Page       int         `json:"page,string"`
	Rows       int         `json:"rows,string"`
	TotalCount int         `json:"total_count,string"`
	TotalPage  int         `json:"total_page,string"`
	List       []TradeBean `json:"list,omitempty,string"`
}

type AliBillBean struct {
	Id                          int
	Trade_no                    string
	Out_trade_no                string
	Buyer_logon_id              string
	Trade_status                string
	Total_amount                string
	Receipt_amount              string
	Send_pay_date               string
	Store_id                    string
	Terminal_id                 string
	Store_name                  string
	Buyer_user_id               string
	Discount_goods_detail       string
	Buyer_pay_amount            string
	Fund_bill_list              string
	Fund_bill_list_Amount       string
	Fund_bill_list_Fund_channel string
	Invoice_amount              string
	Open_id                     string
	Point_amount                string
	Industry_sepc_detail        string
	ShoperId                    string
	Time_end                    string
	OrgCode                     string
	ShopCode                    string
	StoreCode                   string
	TerminalCode                string
	DownTradeNo                 string
	RawData                     string
	AuthCode                    string
	OperId                      string
	Trade_type                  string
	Subject                     string
	GoodsDetail                 string
	UndiscountableAmt           string
	Alipay_store_id             string
	AppId                       string
	Pid                         string
	App_auth_token              string
	Gmt_payment                 string
	Card_balance                string
	CodeUrl                     string
	RefundSubject               string
	RefundFee                   string
	RefundChange                string
	RefundTime                  string
	Send_back_fee               string
	RefundDetailItemList        string
	BatchNo                     int
}

type RespAliBill struct {
	Response
	Data AliBillBean `json:"data,omitempty"`
}

type JsPayBean struct {
	Order     string
	AppId     string
	NonceStr  string
	Package   string
	SignType  string
	TimeStamp int64
	PaySign   string
}

type RespWxBill struct {
	Response
	Data  TradeBean `json:"data,omitempty"`
	JsPay JsPayBean `json:"jspay,omitempty"`
}
